folder-hook 'gmail' 'source ~/.mutt/gmailconfig'
#folder-hook 'hotmail' 'source ~/.mutt/offlinegmx'
set timeout=0
## Switch to default account on startup.

## GNUTerryPratchett
my_hdr X-Clacks-Overhead: GNU Terry Pratchett 

## Abook
set query_command= "abook --mutt-query '%s'"
macro index,pager  a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
bind editor        <Tab> complete-query
set editor="emacsclient -a \"\" -t"

source ~/.mutt/crypto
source "gpg2 -dq /home/eddie/.mutt/mypwds.gpg |"
source ~/.mutt/gpg.rc

set pgp_use_gpg_agent = yes
set pgp_verify_sig = yes
set pgp_sign_as = 6BC1E680
set pgp_timeout = 3600
set crypt_autosign = yes
set crypt_replyencrypt = yes

set sidebar_visible = yes

# Ctrl-n, Ctrl-p to select next, previous folder.
# Ctrl-o to open selected folder.
bind index,pager \CP sidebar-prev
bind index,pager \CN sidebar-next
bind index,pager \CO sidebar-open

## You'll need a file in .mutt encrypted as mypwds.gpg containing this:
## set my_pw_lavabit=lavapassword
## set my_pw_gmail=gmailpassword

source "~/.mutt/offlinegmail"
set mailcap_path 	= ~/.mutt/mailcap
## Shortcuts
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/gmailconfig<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/hotmailconfig<enter><change-folder>!<enter>'
macro index <f4> '<sync-mailbox><enter-command>source ~/.mutt/bitconfig<enter><change-folder>!<enter>'
macro index <F8> "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
macro index <F9> "<limit>all\n" "show all messages (undo limit)"

set editor="emacsclient -a \"\" -t"
color attachment brightgreen  default
color error      brightred    default
color hdrdefault green        default
color indicator  black  green
color markers    brightgreen  default
color message    brightgreen  default
color normal     default      default
color quoted     brightgreen  default
color search     default      green
color signature  green        default
color status     black        green
color tilde      green        default
color tree       green        default

auto_view text/html
alternative_order text/plain text/html
